Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing] Add basic setup and sample tests for Codeception System Tests #16743

Merged
merged 174 commits into from
Jun 18, 2017

Conversation

yvesh
Copy link
Member

@yvesh yvesh commented Jun 18, 2017

Summary of Changes

This pull request adds the basic setup and configuration for the Joomla browser based System Tests. It contains sample tests for com_users. During the next weeks more tests are going to be ported from the system tests repository
. Additionally Continuous Integration will be activated running the test suite for every PR and commit.

Testing Instructions

For a complete description check the README.md in tests/codeception

Prerequisites:

  • Webserver with PHP installed
  • Google Chrome
  • Composer
  • PHP 5.6 Cli (or later)
  • Java JDK (8 or later)

Step by Step:

  • Navigate in your terminal to tests/codeception
  • Do a composer install
  • cp and modify the acceptance.suite.dist.yml to acceptance.suite.yml
  • Navigate back to the root folder of Joomla
  • Run tests/codeception/vendor/bin/robo run:tests

Expected result

Joomla has System tests

Actual result

Joomla has no System tests

Documentation Changes Required

Yes, parts are already integrated and will be updated the next days.

Thank you to all people working on this topic in the last years!

yvesh and others added 30 commits May 15, 2016 22:00
New integration of Codeception 2.2 dev-master into Joomla
Adds Gherkin Pages and Step Objects as sample of useage
…dSteps2

[tests] new convention for locating elements
Adding testing instructions to readme
Adding users.feature scenarios using gherkin
# Conflicts:
#	RoboFile.php
#	tests/_support/AcceptanceTester.php
#	tests/acceptance.suite.dist.yml

2. Install `composer` in your system. Read more about [how to install composer](https://getcomposer.org/doc/00-intro.md) here.

3. Install composer packages using following steps from root directory of this project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using the following

2. Install `composer` in your system. Read more about [how to install composer](https://getcomposer.org/doc/00-intro.md) here.

3. Install composer packages using following steps from root directory of this project.
We are using `composer.json` file for `tests/codeception` folder, so that you will have to run composer install from tests directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the tests directory

$ tests\codeception\vendor\bin\robo run:test
```

If you want to see steps then you can use `--steps` option of codeception. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the steps

$ cd tests/codeception && composer install
```

4. Copy `tests/codeception/acceptance.suite.dist.yml` to `tests/codeception/acceptance.suite.yml` and change settings according to your webserver.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the settings


If you want to see steps then you can use `--steps` option of codeception. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_

**Note**:You can modify the timeout time by setting the value of **TIMEOUT** constant lower for fast machines and higher for slow computers. The constant located in the file `tests/codeception/acceptance/_bootstrap.php`
Copy link
Contributor

@brianteeman brianteeman Jun 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+Note: You can modify the timeout time by setting the value of the TIMEOUT constant lower for fast machines and higher for slow computers. The constant is located in the file tests/codeception/acceptance/_bootstrap.php

* @package Joomla.Test
* @subpackage AcceptanceTester
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2017

* @subpackage AcceptanceTester
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LICENSE.txt

* @subpackage AcceptanceTester
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the same for all new files

}

/**
* See an entry in the database
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be better as Find in the database and not found in the database?

}

/**
* Edit an user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit a user

(the rule is that it is an when before a vowel EXCEPT when the vowel is pronounced as a consonant - which it is in this case YOU-SIR

#
# Suite for functional (integration) tests
# Emulate web requests and make application process them
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the framework

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was generated by codeception, but i still fixed it for us :) Thank you @brianteeman !!

@zero-24
Copy link
Contributor

zero-24 commented Jun 18, 2017

@yvesh did you already run the script for the header that I did not updated yesterday?

@yvesh
Copy link
Member Author

yvesh commented Jun 18, 2017

@zero-24 Updated it manually now, because we have too many different subpackage names.

@SniperSister
Copy link
Contributor

I have tested this item ✅ successfully on 6ddf0c2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16743.

@dneukirchen
Copy link
Contributor

I have tested this item ✅ successfully

bildschirmfoto 2017-06-18 um 12 58 57

$ tests\codeception\vendor\bin\robo run:test
```

If you want to see the steps then you can use `--steps` option of codeception. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove trailing _

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.